pygrub: extlinux parsing correctness
authorRoger Pau Monne <roger.pau@entel.upc.edu>
Tue, 7 Feb 2012 17:21:27 +0000 (17:21 +0000)
committerRoger Pau Monne <roger.pau@entel.upc.edu>
Tue, 7 Feb 2012 17:21:27 +0000 (17:21 +0000)
commit7af6c7ad830ede5b9aad3fe58140e3f0aa0787af
tree1a3096f4cf47f903a3cc4b36aca5e3d01faa9e07
parent9eaf53f5a0c6830aa16a062d9ab1e5de6d6a7f62
pygrub: extlinux parsing correctness

The "in" operator should be used instead of the find method, since
we are only interested in knowing whether the line contains "initrd=",
but we don't care about it's position. Also fixes an error that
happens when initrd= it's at the start of the line, since find returns
0 and is evaluated as False.

Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/pygrub/src/ExtLinuxConf.py